package me.raih.controller.user;

import me.raih.pojo.vo.Manager;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpSession;

/**
 * @Author Raih
 * @Time 2020/12/16 12:01
 */
@Controller
public class UserIndexController {

    @Autowired
    Manager manager;

    /**
     *
     * @return 单纯去首页
     */
    @RequestMapping(value = {"/user/index","/"})
    public String toIndex(HttpSession session){
        //要存在session中，因为在公共页面展示，存在model中下一个页面不一定有了
        session.setAttribute("MANAGER",manager);
        return "user/index";
    }

}
